package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.washe.config.*;
import com.yanqu.road.entity.activity.washe.data.*;
import com.yanqu.road.entity.activity.washe.jinbiao.*;
import com.yanqu.road.entity.season.SeasonRewardConfig;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class WasheBusiness {

    // 配置

    public static Map<Integer, WasheRankConfig> getWasheRankConfigMap(String dbParam, int activityId, int seasonId) {
        return DaoHelper.getTempWasheRankConfigDaoImpl(dbParam).getWasheRankConfigMap(activityId, seasonId);
    }

    public static Map<Integer, WasheRoundConfig> getWasheRoundConfigMap(String dbParam, int activityId, int seasonId, int channelActivityTimeZone) {
        return DaoHelper.getTempWasheRoundConfigDaoImpl(dbParam).getWasheRoundConfigMap(activityId, seasonId, channelActivityTimeZone);
    }

    public static Map<Integer, WasheSceneConfig> getWasheSceneConfigMap(String dbParam, int activityId) {
        return DaoHelper.getTempWasheSceneConfigDaoImpl(dbParam).getWasheSceneConfigMap(activityId);
    }

    public static Map<Integer, WasheCardConfig> getWasheCardConfigMap(String dbParam, int activityId) {
        return DaoHelper.getTempWasheCardConfigDaoImpl(dbParam).getOperaMaskRewardConfigMap(activityId);
    }

    public static Map<Integer, WasheSkillConfig> getWasheSkillConfigMap(String dbParam, int activityId) {
        return DaoHelper.getTempWasheSkillConfigDaoImpl(dbParam).getWasheSkillConfigMap(activityId);
    }

    public static Map<Integer, WasheModeConfig> getWasheModeConfigMap(String dbParam, int activityId) {
        return DaoHelper.getTempWasheModeConfigDaoImpl(dbParam).getWasheModeConfigMap(activityId);
    }

    public static Map<Integer, WasheSeasonConfig> getWasheSeasonTimeConfigMap(String dbParam, int activityId, int channelActivityTimeZone) {
        return DaoHelper.getTempWasheSeasonConfigDaoImpl(dbParam).getWasheSeasonTimeConfigMap(activityId, channelActivityTimeZone);
    }

    public static Map<Integer, List<WasheBoxConfig>> getWasheBoxConfigListMap(String dbParam, int activityId, int seasonId, int version) {
        return DaoHelper.getTempWasheBoxConfigDaoImpl(dbParam).getWasheBoxConfigListMap(activityId, seasonId, version);
    }

    public static Map<Integer, Map<Integer, Map<Integer, SeasonRewardConfig>>> getSeasonRewardConfigMap(String dbParam, int activityId, int seasonId) {
        return DaoHelper.getTempSeasonRewardConfigDaoImpl(dbParam).getSeasonRewardConfigMap(activityId, seasonId);
    }

    public static Map<Integer, List<WasheHonorMomentConfig>> getWasheHonorMomentConfigMap(String dbParam, int activityId) {
        return DaoHelper.getTempWasheHonorMomentConfigDaoImpl(dbParam).getWasheHonorMomentConfigMap(activityId);
    }

    public static long getWasheNewHandScore(String dbParam, int activityId) {
        return DaoHelper.getTempSeasonRewardConfigDaoImpl(dbParam).getWasheNewHandScore(activityId);
    }

    public static Map<Integer, SeasonRewardConfig> getWasheZhanLingConfigMap(String dbParam, int activityId, int seasonId) {
        return DaoHelper.getTempSeasonRewardConfigDaoImpl(dbParam).getWasheZhanLingConfigMap(activityId, seasonId);
    }

    // 数据

    public static WasheUserData getWasheUserData(long userId) {
        return DaoHelper.getWasheUserDataDaoImpl().getWasheUserData(userId);
    }

    public static boolean updateWasheUserData(WasheUserData data) {
        return DaoHelper.getWasheUserDataDaoImpl().update(data);
    }

    public static boolean addWasheUserData(WasheUserData data) {
        return DaoHelper.getWasheUserDataDaoImpl().add(data);
    }

    public static WasheUserJinBiaoData getWasheUserJinBiaoData(long userId) {
        return DaoHelper.getWasheUserJinBiaoDataDaoImpl().getWasheUserJinBiaoData(userId);
    }

    public static boolean updateWasheUserJinBiaoData(WasheUserJinBiaoData data) {
        return DaoHelper.getWasheUserJinBiaoDataDaoImpl().update(data);
    }

    public static boolean addWasheUserJinBiaoData(WasheUserJinBiaoData data) {
        return DaoHelper.getWasheUserJinBiaoDataDaoImpl().add(data);
    }

    public static Map<Long, WasheUserData> getWasheUserDataMapByDataSeason(int minDataSeason) {
        return DaoHelper.getWasheUserDataDaoImpl().getWasheUserDataMapByDataSeason(minDataSeason);
    }

    public static List<WasheBattleRecord> getWasheBattleRecordList(long userId, int type, int limit) {
        return DaoHelper.getWasheBattleRecordDaoImpl().getWasheBattleRecordList(userId, type, limit);
    }

    public static boolean addWasheBattleRecord(WasheBattleRecord data) {
        return DaoHelper.getWasheBattleRecordDaoImpl().add(data);
    }

    public static WasheLastResultData getWasheLastResultData(long userId) {
        return DaoHelper.getWasheLastResultDataDaoImpl().getWasheLastResultData(userId);
    }

    public static boolean addWasheLastResultData(WasheLastResultData data) {
        return DaoHelper.getWasheLastResultDataDaoImpl().add(data);
    }

    public static boolean updateWasheLastResultData(WasheLastResultData data) {
        return DaoHelper.getWasheLastResultDataDaoImpl().update(data);
    }

    public static WasheHistory getWasheHistory(long userId) {
        return DaoHelper.getWasheHistoryDaoImpl().getWasheHistory(userId);
    }

    public static boolean updateWasheHistory(WasheHistory data) {
        return DaoHelper.getWasheHistoryDaoImpl().update(data);
    }

    public static boolean addWasheHistory(WasheHistory data) {
        return DaoHelper.getWasheHistoryDaoImpl().add(data);
    }

    public static WasheHonorMoment getWasheHonorMoment(long userId) {
        return DaoHelper.getWasheHonorMomentDaoImpl().getWasheHonorMoment(userId);
    }

    public static boolean updateWasheHonorMoment(WasheHonorMoment data) {
        return DaoHelper.getWasheHonorMomentDaoImpl().update(data);
    }

    public static boolean addWasheHonorMoment(WasheHonorMoment data) {
        return DaoHelper.getWasheHonorMomentDaoImpl().add(data);
    }

    public static Map<Integer, Map<Integer, WasheHistoryRank>> getWasheHistoryRankMap() {
        return DaoHelper.getWasheHistoryRankDaoImpl().getWasheHistoryRankMap();
    }

    public static boolean addWasheHistoryRank(WasheHistoryRank data) {
        return DaoHelper.getWasheHistoryRankDaoImpl().add(data);
    }

    public static boolean updateWasheHistoryRank(WasheHistoryRank data) {
        return DaoHelper.getWasheHistoryRankDaoImpl().update(data);
    }


    public static WasheSceneData getWasheSceneData(String channelKey) {
        return DaoHelper.getWasheSceneDataDaoImpl().getWasheSceneData(channelKey);
    }

    public static boolean updateWasheSceneData(WasheSceneData data) {
        return DaoHelper.getWasheSceneDataDaoImpl().update(data);
    }

    public static boolean addWasheSceneData(WasheSceneData data) {
        return DaoHelper.getWasheSceneDataDaoImpl().add(data);
    }

    public static Map<Integer, List<WasheJinBiaoPeakBattleData>> getWasheJinBiaoPeakBattleDataMap(int seasonId) {
        return DaoHelper.getWasheJinBiaoPeakBattleDaoImpl().getWasheJinBiaoPeakBattleDataMap(seasonId);
    }

    public static boolean addWasheJinBiaoPeakBattleData(WasheJinBiaoPeakBattleData data) {
        return DaoHelper.getWasheJinBiaoPeakBattleDaoImpl().add(data);
    }

    public static boolean updateWasheJinBiaoPeakBattleData(WasheJinBiaoPeakBattleData data) {
        return DaoHelper.getWasheJinBiaoPeakBattleDaoImpl().update(data);
    }

}
